#include "Core/Log/LogManager.h"
#include "Core/Memory/SharedPointer.h"
#include "Core/Profile/CodeProfile.h"
#include "SmartPointerTest.h"

const char * SmartPointerTest::GetName() const
{
	return "SmartPointer Test";
}

error SmartPointerTest::Create()
{
	return errOK;
}

error SmartPointerTest::Destroy()
{
	if(Failed(UnitTest::Destroy()))
		return errFailed;

	return errOK;
}

error SmartPointerTest::Execute()
{
	PROFILE(GetName());

	SharedPointer<A> spA;
	spA=new A;
	spA->a=2;

	if( spA->getA()!=2 )
		return errFailed;

	return errOK;
}
